package com.matt.repository.rel;

import com.matt.domain.rel.RelClassesTeacher;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * *******************************
 * Created by Ron.
 * form com.matt
 * on 2017/7/14
 * *******************************
 */
public interface RelClassesTeacherRepository extends JpaRepository<RelClassesTeacher, String> {

    @Modifying
    @Transactional
    Long deleteByClassesId(String classesId);

    Integer countByStaffId(String staffId);

    List<RelClassesTeacher> findByClassesId(String classesId);

    List<RelClassesTeacher> findByStaffId(String staffId);
}
